/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 采购入库Entity
 * @author HOHD
 * @version 2020-12-11
 */
@Table(name="st_buy_stock_in_detail", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="stock_in_bill_no", attrName="stockInBillNo", label="入库单号"),
		@Column(name="bill_date", attrName="billDate", label="单据日期"),
		@Column(name="check_state", attrName="checkState", label="检验状态"),
		@Column(name="material_name", attrName="materialName", label="物料名称", queryType=QueryType.LIKE),
		@Column(name="batch_number", attrName="batchNumber", label="批号"),
		@Column(name="pack_type", attrName="packType", label="包装规格"),
		@Column(name="product_maker", attrName="productMaker", label="生产厂商"),
		@Column(name="default_warehouse", attrName="defaultWarehouse", label="仓位"),
		@Column(name="number", attrName="number", label="数量"),
		@Column(name="primary_number", attrName="primaryNumber", label="源单数量"),
		@Column(name="unit", attrName="unit", label="单位"),
		@Column(name="product_date", attrName="productDate", label="生产日期"),
		@Column(name="saved_type", attrName="savedType", label="保质期"),
		@Column(name="passed_date", attrName="passedDate", label="到期日期"),
		@Column(name="remark", attrName="remark", label="备注"),
		@Column(name="parentid", attrName="parentid.id", label="主表id"),
	}, orderBy="a.id ASC"
)
public class StBuyStockInDetail extends DataEntity<StBuyStockInDetail> {
	
	private static final long serialVersionUID = 1L;
	private String stockInBillNo;		// 入库单号
	private Date billDate;		// 单据日期
	private Integer checkState;		// 检验状态
	private String materialName;		// 物料名称
	private String batchNumber;		// 批号
	private String packType;		// 包装规格
	private String productMaker;		// 生产厂商
	private String defaultWarehouse;		// 仓位
	private Integer number;		// 数量
	private Integer primaryNumber;		// 源单数量
	private String unit;		// 单位
	private Date productDate;		// 生产日期
	private Integer savedType;		// 保质期
	private Date passedDate;		// 到期日期
	private String remark;		// 备注
	private StBuyStockIn parentid;		// 主表id 父类
	
	public StBuyStockInDetail() {
		this(null);
	}


	public StBuyStockInDetail(StBuyStockIn parentid){
		this.parentid = parentid;
	}
	
	@Length(min=0, max=20, message="入库单号长度不能超过 20 个字符")
	public String getStockInBillNo() {
		return stockInBillNo;
	}

	public void setStockInBillNo(String stockInBillNo) {
		this.stockInBillNo = stockInBillNo;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getBillDate() {
		return billDate;
	}

	public void setBillDate(Date billDate) {
		this.billDate = billDate;
	}
	
	public Integer getCheckState() {
		return checkState;
	}

	public void setCheckState(Integer checkState) {
		this.checkState = checkState;
	}
	
	@Length(min=0, max=36, message="物料名称长度不能超过 36 个字符")
	public String getMaterialName() {
		return materialName;
	}

	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}
	
	@Length(min=0, max=20, message="批号长度不能超过 20 个字符")
	public String getBatchNumber() {
		return batchNumber;
	}

	public void setBatchNumber(String batchNumber) {
		this.batchNumber = batchNumber;
	}
	
	@Length(min=0, max=20, message="包装规格长度不能超过 20 个字符")
	public String getPackType() {
		return packType;
	}

	public void setPackType(String packType) {
		this.packType = packType;
	}
	
	@Length(min=0, max=36, message="生产厂商长度不能超过 36 个字符")
	public String getProductMaker() {
		return productMaker;
	}

	public void setProductMaker(String productMaker) {
		this.productMaker = productMaker;
	}
	
	@Length(min=0, max=36, message="仓位长度不能超过 36 个字符")
	public String getDefaultWarehouse() {
		return defaultWarehouse;
	}

	public void setDefaultWarehouse(String defaultWarehouse) {
		this.defaultWarehouse = defaultWarehouse;
	}
	
	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}
	
	public Integer getPrimaryNumber() {
		return primaryNumber;
	}

	public void setPrimaryNumber(Integer primaryNumber) {
		this.primaryNumber = primaryNumber;
	}
	
	@Length(min=0, max=10, message="单位长度不能超过 10 个字符")
	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getProductDate() {
		return productDate;
	}

	public void setProductDate(Date productDate) {
		this.productDate = productDate;
	}
	
	public Integer getSavedType() {
		return savedType;
	}

	public void setSavedType(Integer savedType) {
		this.savedType = savedType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getPassedDate() {
		return passedDate;
	}

	public void setPassedDate(Date passedDate) {
		this.passedDate = passedDate;
	}
	
	@Length(min=0, max=255, message="备注长度不能超过 255 个字符")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@Length(min=0, max=36, message="主表id长度不能超过 36 个字符")
	public StBuyStockIn getParentid() {
		return parentid;
	}

	public void setParentid(StBuyStockIn parentid) {
		this.parentid = parentid;
	}
	
}